function Equeue() {
  // 用数组存储队列, 队列是一种线性逻辑结构
  this.items = []
  // 入队列
  Equeue.prototype.enqueue = function(el) {
    return this.items.push(el)
  }
  // 出队列
  Equeue.prototype.dequeue = function(el) {
    return this.items.shift()
  }
  // 队列是否为空
  Equeue.prototype.isEmpty = function() {
    return !this.items.length
  }
  // 队列的容量
  Equeue.prototype.size = function() {
    return this.items.length
  }
  // 队列的toString
  Equeue.prototype.toString = function() {
    let str = ""
    this.items.forEach(el => {
      str += (el.toString() || el)
    })
    return str
  }
}

export default Equeue